<include file="Base:header" />

<!--正文内容 开始-->


<div class="graybg" >
	<div class="main">
		<include file="Base:_category_bar" />
	</div>
	
	<div class="index_content">

		<div class="">
			<include file="Base:_slide_list" title='消费者洞察' data='xfzdc' more="{:U('search/index',['pat'=>'xfzdc'])}" />
		</div>		
		<div>
			<include file="Base:_slide_list" title='精选案例' data='recommend' more="{:U('search/index',['pat'=>'recommend'])}" />
		</div>
		<div>
			<include file="Base:_slide_list" title='经典案例' data='classics' more="{:U('search/index',['pat'=>'classics'])}" />
		</div>
<!-- 		<div class="">
			<include file="Base:_slide_list" title='最新作品' data='newest' more="{:U('search/index',['pat'=>'newest'])}" />
		</div>
		<div class="">
			<include file="Base:_slide_list" title='用户热门搜索' data='hot' more="{:U('search/index',['pat'=>'hot'])}" />
		</div>
		<div class="">
			<include file="Base:_slide_list" title='{$custom_name}推荐' data='custom' more="{:U('search/index',['pat'=>'custom'])}" />
		</div>
		<div class="">
			<include file="Base:_slide_list" title='随机展示' data='random' more="{:U('search/index',['pat'=>'random'])}" />
		</div> -->
		</div>	
	
<!-- 正文内容----结束-->

<include file="Base:footer" />

<script type="text/javascript">
//滚动，头图切换横幅
$(window, document, document.html).scroll(function(e) {
	
	var limitHeight = $('#header').height()-60;
	var winTop = $(window).scrollTop();
	e.preventDefault();
	if(!$("#header").hasClass("mini")) {
		if(winTop >= limitHeight) {
			if($("#header_fix").hasClass("fix")) {
				return;
			}
			$("#header_fix").addClass("fix");
			
			if($("#header_fix").hasClass("fix")){
				$(".insight_logo").show();
			}
		}
		if(winTop <= limitHeight) {
			$("#header_fix").removeClass("fix");
			$(".insight_logo").show();
		}
	}

});

var mySwiper = new Swiper ('.index_swiper', {
		prevButton:'.swiper-button-prev',
		nextButton:'.swiper-button-next',
		    paginationClickable: true,
		    autoplay : 5000,
			direction: 'horizontal',
			loop: false,
			paginationClickable: true,
		onSlideChangeEnd: function(swiper){
		    var active = mySwiper.activeIndex; //切换结束时，告诉我现在是第几个slide
		    var prev = mySwiper.previousIndex;
			if($(".index_swiper .swiper-slide:eq("+active+")").find("video").length==0){
			}else{
				$(".index_swiper .swiper-slide:eq("+active+") video")[0].play();
			}
			if($(".index_swiper .swiper-slide:eq("+prev+")").find("video").length==0){
			}else{
				$(".index_swiper .swiper-slide:eq("+prev+") video")[0].pause();
			}
	    }
	})  
			
			
			
$(document).ready(function() {
	mainliWidth();
	$(window).resize(function() {
		mainliWidth();
	});

	function mainliWidth() {
		var winhei = $(window).height();
		$("#header").height(winhei);
		$(".swiper-container").height(winhei-60);
		$(".swiper-container .swiper-slide").height(winhei-60);
	}
});
		
</script>

</body>

</html>